package com.dpiinc.TechPage.oss

import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.dpiinc.TechPage.UserManager
import com.dpiinc.TechPage.constants.FileType
import com.dpiinc.TechPage.room.AiWriteTypeConverters

/**
 * 上传文件任务
 */
@Entity(tableName = "upload_task")
@TypeConverters(AiWriteTypeConverters::class)
data class UploadTask(var noteId: String,
                      val fileType: FileType,
                      val index: Int = 0) {
    @PrimaryKey(autoGenerate = true)
    var _id: Long = 0
    var fileId: String = ""
    var userId: String = UserManager.getUserId()
    var fileName: String = ""
    var filePath: String = ""

    //创建、更新时间
    var time: Long = 0
}